package 分支语句练习;

import java.util.Scanner;

public class Demo10 {
    public static void main(String[] args) {
        int a= (int) (Math.random()*6)+1;
        int b= (int) (Math.random()*6)+1;
        int c= (int) (Math.random()*6)+1;
        Scanner scanner=new Scanner(System.in);
        System.out.print("请押宝(豹子,大,小):");
        String input=scanner.nextLine();
        System.out.println("a,b,c分别是："+a + "," + b + "," + c);
        String result;
        if(a==b&&b==c){
            result ="豹子";
        }else {
            int sum=a+b+c;
            if (sum>9){
                result="大";
            }else {
                result="小";
            }
        }
        if(input.equals(result)){
            System.out.println("猜中了");
        }else {
            System.out.println("猜错了");
        }
    }
}
